<template>
	<view class="new">
		<newList :newList="InfoData" @handleGoDatail="goDatail"></newList>
	</view>
</template>

<script>
	import newList from '../../components/new.vue'
	export default {
		data() {
			return {
				InfoData:[]
			}
		},
		methods: {
			async getInfo(){
				const res = await this.$request({
					url:"/api/getnewslist"
				})
				this.InfoData = res.data.message
			},
			goDatail(id){
				uni.navigateTo({
					url:`../detail/detail?newid=${id}`
				})
			}
		},
		onLoad() {
			this.getInfo()
		},
		components:{
			newList
		}
	}
</script>

<style lang="less" scoped>

</style>
